home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / spiderweb / tools / tie / history.web < prev    next >
Text File  |  1992-07-05  |  739b  |  26 lines

  1. @*Job history.
  2.  We introduce a history variable that allows us to set a
  3. return code if the operating system and the local \PASCAL\
  4. compiler allow it.  First we introduce the coded values for
  5. the history.
  6.  
  7. @d spotless = 0
  8. @d troublesome = 1
  9. @d fatal = 2
  10.  
  11. @<Globals in ...@>=
  12. @!int history;
  13.  
  14.  
  15. @ We must initialize this variable at the very beginning.
  16.  
  17. @<Set initial values@>=
  18. history=spotless;
  19. @ At the end of the job we may want to print out the history.
  20. @<Print the job |history|...@>=
  21. switch ( history) {
  22. case spotless: if (verbose) print_ln("(No errors were found.)"); break;
  23. case troublesome: print_ln("(Pardon me, but I think I spotted something wrong.)"); break;
  24. case fatal: print_ln("(That was a fatal error, my friend.)"); break;
  25. }
  26.